//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension CodeCatalyst {
    // MARK: Enums

    public enum ComparisonOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case eq = "EQ"
        case ge = "GE"
        case gt = "GT"
        case le = "LE"
        case lt = "LT"
        public var description: String { return self.rawValue }
    }

    public enum DevEnvironmentSessionType: String, CustomStringConvertible, Codable, _SotoSendable {
        case ssh = "SSH"
        case ssm = "SSM"
        public var description: String { return self.rawValue }
    }

    public enum DevEnvironmentStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case deleted = "DELETED"
        case deleting = "DELETING"
        case failed = "FAILED"
        case pending = "PENDING"
        case running = "RUNNING"
        case starting = "STARTING"
        case stopped = "STOPPED"
        case stopping = "STOPPING"
        public var description: String { return self.rawValue }
    }

    public enum FilterKey: String, CustomStringConvertible, Codable, _SotoSendable {
        case hasAccessTo
        public var description: String { return self.rawValue }
    }

    public enum InstanceType: String, CustomStringConvertible, Codable, _SotoSendable {
        case devStandard1Large = "dev.standard1.large"
        case devStandard1Medium = "dev.standard1.medium"
        case devStandard1Small = "dev.standard1.small"
        case devStandard1Xlarge = "dev.standard1.xlarge"
        public var description: String { return self.rawValue }
    }

    public enum OperationType: String, CustomStringConvertible, Codable, _SotoSendable {
        case mutation = "MUTATION"
        case readonly = "READONLY"
        public var description: String { return self.rawValue }
    }

    public enum UserType: String, CustomStringConvertible, Codable, _SotoSendable {
        case awsAccount = "AWS_ACCOUNT"
        case unknown = "UNKNOWN"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccessTokenSummary: AWSDecodableShape {
        /// The date and time when the personal access token will expire, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var expiresTime: Date?
        /// The system-generated ID of the personal access token.
        public let id: String
        /// The friendly name of the personal access token.
        public let name: String

        public init(expiresTime: Date? = nil, id: String, name: String) {
            self.expiresTime = expiresTime
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case expiresTime
            case id
            case name
        }
    }

    public struct CreateAccessTokenRequest: AWSEncodableShape {
        /// The date and time the personal access token expires, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var expiresTime: Date?
        /// The friendly name of the personal access token.
        public let name: String

        public init(expiresTime: Date? = nil, name: String) {
            self.expiresTime = expiresTime
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case expiresTime
            case name
        }
    }

    public struct CreateAccessTokenResponse: AWSDecodableShape {
        /// The date and time the personal access token expires, in coordinated universal time (UTC) timestamp format as specified in RFC 3339. If not specified, the default is one year from creation.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var expiresTime: Date?
        /// The friendly name of the personal access token.
        public let name: String?
        /// The secret value of the personal access token.
        public let secret: String

        public init(expiresTime: Date? = nil, name: String? = nil, secret: String) {
            self.expiresTime = expiresTime
            self.name = name
            self.secret = secret
        }

        private enum CodingKeys: String, CodingKey {
            case expiresTime
            case name
            case secret
        }
    }

    public struct CreateDevEnvironmentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The user-defined alias for a Dev Environment.
        public let alias: String?
        /// A user-specified idempotency token.  Idempotency ensures that an API request completes only once.  With an idempotent request, if the original request completes successfully, the subsequent retries return the result from the original successful request and have no additional effect.
        public let clientToken: String?
        /// Information about the integrated development environment (IDE) configured for a Dev Environment.  An IDE is required to create a Dev Environment. For Dev Environment creation, this field contains configuration information and must be provided.
        public let ides: [IdeConfiguration]?
        /// The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Only whole integers are allowed. Dev Environments consume compute minutes when running.
        public let inactivityTimeoutMinutes: Int?
        /// The Amazon EC2 instace type to use for the Dev Environment.
        public let instanceType: InstanceType
        /// Information about the amount of storage allocated to the Dev Environment. By default, a Dev Environment is configured to have 16GB of persistent storage.  Valid values for persistent storage are based on memory sizes in 16GB increments. Valid values are 16, 32, and 64.
        public let persistentStorage: PersistentStorageConfiguration
        /// The name of the project in the space.
        public let projectName: String
        /// The source repository that contains the branch to clone into the Dev Environment.
        public let repositories: [RepositoryInput]?
        /// The name of the space.
        public let spaceName: String

        public init(alias: String? = nil, clientToken: String? = nil, ides: [IdeConfiguration]? = nil, inactivityTimeoutMinutes: Int? = nil, instanceType: InstanceType, persistentStorage: PersistentStorageConfiguration, projectName: String, repositories: [RepositoryInput]? = nil, spaceName: String) {
            self.alias = alias
            self.clientToken = clientToken
            self.ides = ides
            self.inactivityTimeoutMinutes = inactivityTimeoutMinutes
            self.instanceType = instanceType
            self.persistentStorage = persistentStorage
            self.projectName = projectName
            self.repositories = repositories
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 1024)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.ides, name: "ides", parent: name, max: 1)
            try self.validate(self.inactivityTimeoutMinutes, name: "inactivityTimeoutMinutes", parent: name, max: 1200)
            try self.validate(self.inactivityTimeoutMinutes, name: "inactivityTimeoutMinutes", parent: name, min: 0)
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.repositories?.forEach {
                try $0.validate(name: "\(name).repositories[]")
            }
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case alias
            case clientToken
            case ides
            case inactivityTimeoutMinutes
            case instanceType
            case persistentStorage
            case repositories
        }
    }

    public struct CreateDevEnvironmentResponse: AWSDecodableShape {
        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(id: String, projectName: String, spaceName: String) {
            self.id = id
            self.projectName = projectName
            self.spaceName = spaceName
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case projectName
            case spaceName
        }
    }

    public struct CreateProjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The description of the project. This description will be displayed to all users of the project. We recommend providing a brief description of the project and its intended purpose.
        public let description: String?
        /// The friendly name of the project that will be displayed to users.
        public let displayName: String
        /// The name of the space.
        public let spaceName: String

        public init(description: String? = nil, displayName: String, spaceName: String) {
            self.description = description
            self.displayName = displayName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_a-zA-Z0-9.,;:/\\+=?&$% \n\t\r])*$")
            try self.validate(self.displayName, name: "displayName", parent: name, max: 63)
            try self.validate(self.displayName, name: "displayName", parent: name, min: 3)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\. ][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case displayName
        }
    }

    public struct CreateProjectResponse: AWSDecodableShape {
        /// The description of the project.
        public let description: String?
        /// The friendly name of the project.
        public let displayName: String?
        /// The name of the project in the space.
        public let name: String
        /// The name of the space.
        public let spaceName: String?

        public init(description: String? = nil, displayName: String? = nil, name: String, spaceName: String? = nil) {
            self.description = description
            self.displayName = displayName
            self.name = name
            self.spaceName = spaceName
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case displayName
            case name
            case spaceName
        }
    }

    public struct CreateSourceRepositoryBranchRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "name", location: .uri("name")),
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "sourceRepositoryName", location: .uri("sourceRepositoryName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The commit ID in an existing branch from which you want to create the new branch.
        public let headCommitId: String?
        /// The name for the branch you're creating.
        public let name: String
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the repository where you want to create a branch.
        public let sourceRepositoryName: String
        /// The name of the space.
        public let spaceName: String

        public init(headCommitId: String? = nil, name: String, projectName: String, sourceRepositoryName: String, spaceName: String) {
            self.headCommitId = headCommitId
            self.name = name
            self.projectName = projectName
            self.sourceRepositoryName = sourceRepositoryName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.sourceRepositoryName, name: "sourceRepositoryName", parent: name, max: 100)
            try self.validate(self.sourceRepositoryName, name: "sourceRepositoryName", parent: name, min: 1)
            try self.validate(self.sourceRepositoryName, name: "sourceRepositoryName", parent: name, pattern: "^(?!.*[.]git$)[\\w\\-.]*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case headCommitId
        }
    }

    public struct CreateSourceRepositoryBranchResponse: AWSDecodableShape {
        /// The commit ID of the tip of the newly created branch.
        public let headCommitId: String?
        /// The time the branch was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdatedTime: Date?
        /// The name of the newly created branch.
        public let name: String?
        /// The Git reference name of the branch.
        public let ref: String?

        public init(headCommitId: String? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, ref: String? = nil) {
            self.headCommitId = headCommitId
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.ref = ref
        }

        private enum CodingKeys: String, CodingKey {
            case headCommitId
            case lastUpdatedTime
            case name
            case ref
        }
    }

    public struct DeleteAccessTokenRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id"))
        ]

        /// The ID of the personal access token to delete. You can find the IDs of all PATs associated with your user account by calling ListAccessTokens.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteAccessTokenResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDevEnvironmentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The system-generated unique ID of the Dev Environment you want to delete. To retrieve a list of Dev Environment IDs, use ListDevEnvironments.
        public let id: String
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(id: String, projectName: String, spaceName: String) {
            self.id = id
            self.projectName = projectName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDevEnvironmentResponse: AWSDecodableShape {
        /// The system-generated unique ID of the deleted Dev Environment.
        public let id: String
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(id: String, projectName: String, spaceName: String) {
            self.id = id
            self.projectName = projectName
            self.spaceName = spaceName
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case projectName
            case spaceName
        }
    }

    public struct DevEnvironmentAccessDetails: AWSDecodableShape {
        /// The URL used to send commands to and from the Dev Environment.
        public let streamUrl: String
        /// An encrypted token value that contains session and caller information used to authenticate the connection.
        public let tokenValue: String

        public init(streamUrl: String, tokenValue: String) {
            self.streamUrl = streamUrl
            self.tokenValue = tokenValue
        }

        private enum CodingKeys: String, CodingKey {
            case streamUrl
            case tokenValue
        }
    }

    public struct DevEnvironmentRepositorySummary: AWSDecodableShape {
        /// The name of the branch in a source repository cloned into the Dev Environment.
        public let branchName: String?
        /// The name of the source repository.
        public let repositoryName: String

        public init(branchName: String? = nil, repositoryName: String) {
            self.branchName = branchName
            self.repositoryName = repositoryName
        }

        private enum CodingKeys: String, CodingKey {
            case branchName
            case repositoryName
        }
    }

    public struct DevEnvironmentSessionConfiguration: AWSEncodableShape {
        /// Information about optional commands that will be run on the Dev Environment when the SSH session begins.
        public let executeCommandSessionConfiguration: ExecuteCommandSessionConfiguration?
        /// The type of the session.
        public let sessionType: DevEnvironmentSessionType

        public init(executeCommandSessionConfiguration: ExecuteCommandSessionConfiguration? = nil, sessionType: DevEnvironmentSessionType) {
            self.executeCommandSessionConfiguration = executeCommandSessionConfiguration
            self.sessionType = sessionType
        }

        private enum CodingKeys: String, CodingKey {
            case executeCommandSessionConfiguration
            case sessionType
        }
    }

    public struct DevEnvironmentSummary: AWSDecodableShape {
        /// The user-specified alias for the Dev Environment.
        public let alias: String?
        /// The system-generated unique ID of the user who created the Dev Environment.
        public let creatorId: String
        /// The system-generated unique ID for the Dev Environment.
        public let id: String
        /// Information about the integrated development environment (IDE) configured for a Dev Environment.
        public let ides: [Ide]?
        /// The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Dev Environments consume compute minutes when running.
        public let inactivityTimeoutMinutes: Int
        /// The Amazon EC2 instace type used for the Dev Environment.
        public let instanceType: InstanceType
        /// The time when the Dev Environment was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @CustomCoding<ISO8601DateCoder>
        public var lastUpdatedTime: Date
        /// Information about the configuration of persistent storage for the Dev Environment.
        public let persistentStorage: PersistentStorage
        /// The name of the project in the space.
        public let projectName: String?
        /// Information about the repositories that will be cloned into the Dev Environment. If no rvalue is specified, no repository is cloned.
        public let repositories: [DevEnvironmentRepositorySummary]
        /// The name of the space.
        public let spaceName: String?
        /// The status of the Dev Environment.
        public let status: DevEnvironmentStatus
        /// The reason for the status.
        public let statusReason: String?

        public init(alias: String? = nil, creatorId: String, id: String, ides: [Ide]? = nil, inactivityTimeoutMinutes: Int, instanceType: InstanceType, lastUpdatedTime: Date, persistentStorage: PersistentStorage, projectName: String? = nil, repositories: [DevEnvironmentRepositorySummary], spaceName: String? = nil, status: DevEnvironmentStatus, statusReason: String? = nil) {
            self.alias = alias
            self.creatorId = creatorId
            self.id = id
            self.ides = ides
            self.inactivityTimeoutMinutes = inactivityTimeoutMinutes
            self.instanceType = instanceType
            self.lastUpdatedTime = lastUpdatedTime
            self.persistentStorage = persistentStorage
            self.projectName = projectName
            self.repositories = repositories
            self.spaceName = spaceName
            self.status = status
            self.statusReason = statusReason
        }

        private enum CodingKeys: String, CodingKey {
            case alias
            case creatorId
            case id
            case ides
            case inactivityTimeoutMinutes
            case instanceType
            case lastUpdatedTime
            case persistentStorage
            case projectName
            case repositories
            case spaceName
            case status
            case statusReason
        }
    }

    public struct EmailAddress: AWSDecodableShape {
        /// The email address.
        public let email: String?
        /// Whether the email address has been verified.
        public let verified: Bool?

        public init(email: String? = nil, verified: Bool? = nil) {
            self.email = email
            self.verified = verified
        }

        private enum CodingKeys: String, CodingKey {
            case email
            case verified
        }
    }

    public struct EventLogEntry: AWSDecodableShape {
        /// The code of the error, if any.
        public let errorCode: String?
        /// The category for the event.
        public let eventCategory: String
        /// The name of the event.
        public let eventName: String
        /// The source of the event.
        public let eventSource: String
        /// The time the event took place, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @CustomCoding<ISO8601DateCoder>
        public var eventTime: Date
        /// The type of the event.
        public let eventType: String
        /// The system-generated unique ID of the event.
        public let id: String
        /// The type of the event.
        public let operationType: OperationType
        /// Information about the project where the event occurred.
        public let projectInformation: ProjectInformation?
        /// The system-generated unique ID of the request.
        public let requestId: String?
        /// Information about the payload of the request.
        public let requestPayload: EventPayload?
        /// Information about the payload of the response, if any.
        public let responsePayload: EventPayload?
        /// The IP address of the user whose actions are recorded in the event.
        public let sourceIpAddress: String?
        public let userAgent: String?
        /// The system-generated unique ID of the user whose actions are recorded in the event.
        public let userIdentity: UserIdentity

        public init(errorCode: String? = nil, eventCategory: String, eventName: String, eventSource: String, eventTime: Date, eventType: String, id: String, operationType: OperationType, projectInformation: ProjectInformation? = nil, requestId: String? = nil, requestPayload: EventPayload? = nil, responsePayload: EventPayload? = nil, sourceIpAddress: String? = nil, userAgent: String? = nil, userIdentity: UserIdentity) {
            self.errorCode = errorCode
            self.eventCategory = eventCategory
            self.eventName = eventName
            self.eventSource = eventSource
            self.eventTime = eventTime
            self.eventType = eventType
            self.id = id
            self.operationType = operationType
            self.projectInformation = projectInformation
            self.requestId = requestId
            self.requestPayload = requestPayload
            self.responsePayload = responsePayload
            self.sourceIpAddress = sourceIpAddress
            self.userAgent = userAgent
            self.userIdentity = userIdentity
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode
            case eventCategory
            case eventName
            case eventSource
            case eventTime
            case eventType
            case id
            case operationType
            case projectInformation
            case requestId
            case requestPayload
            case responsePayload
            case sourceIpAddress
            case userAgent
            case userIdentity
        }
    }

    public struct EventPayload: AWSDecodableShape {
        /// The type of content in the event payload.
        public let contentType: String?
        /// The data included in the event payload.
        public let data: String?

        public init(contentType: String? = nil, data: String? = nil) {
            self.contentType = contentType
            self.data = data
        }

        private enum CodingKeys: String, CodingKey {
            case contentType
            case data
        }
    }

    public struct ExecuteCommandSessionConfiguration: AWSEncodableShape {
        /// An array of arguments containing arguments and members.
        public let arguments: [String]?
        /// The command used at the beginning of the SSH session to a Dev Environment.
        public let command: String

        public init(arguments: [String]? = nil, command: String) {
            self.arguments = arguments
            self.command = command
        }

        private enum CodingKeys: String, CodingKey {
            case arguments
            case command
        }
    }

    public struct Filter: AWSEncodableShape {
        public let comparisonOperator: String?
        public let key: String
        public let values: [String]

        public init(comparisonOperator: String? = nil, key: String, values: [String]) {
            self.comparisonOperator = comparisonOperator
            self.key = key
            self.values = values
        }

        private enum CodingKeys: String, CodingKey {
            case comparisonOperator
            case key
            case values
        }
    }

    public struct GetDevEnvironmentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The system-generated unique ID of the Dev Environment for which you want to view information. To retrieve a list of Dev Environment IDs, use ListDevEnvironments.
        public let id: String
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(id: String, projectName: String, spaceName: String) {
            self.id = id
            self.projectName = projectName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetDevEnvironmentResponse: AWSDecodableShape {
        /// The user-specified alias for the Dev Environment.
        public let alias: String?
        /// The system-generated unique ID of the user who created the Dev Environment.
        public let creatorId: String
        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// Information about the integrated development environment (IDE) configured for the Dev Environment.
        public let ides: [Ide]?
        /// The amount of time the Dev Environment will run without any activity detected before stopping, in minutes.
        public let inactivityTimeoutMinutes: Int
        /// The Amazon EC2 instace type to use for the Dev Environment.
        public let instanceType: InstanceType
        /// The time when the Dev Environment was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @CustomCoding<ISO8601DateCoder>
        public var lastUpdatedTime: Date
        /// Information about the amount of storage allocated to the Dev Environment.  By default, a Dev Environment is configured to have 16GB of persistent storage.
        public let persistentStorage: PersistentStorage
        /// The name of the project in the space.
        public let projectName: String
        /// The source repository that contains the branch cloned into the Dev Environment.
        public let repositories: [DevEnvironmentRepositorySummary]
        /// The name of the space.
        public let spaceName: String
        /// The current status of the Dev Environment.
        public let status: DevEnvironmentStatus
        /// The reason for the status.
        public let statusReason: String?

        public init(alias: String? = nil, creatorId: String, id: String, ides: [Ide]? = nil, inactivityTimeoutMinutes: Int, instanceType: InstanceType, lastUpdatedTime: Date, persistentStorage: PersistentStorage, projectName: String, repositories: [DevEnvironmentRepositorySummary], spaceName: String, status: DevEnvironmentStatus, statusReason: String? = nil) {
            self.alias = alias
            self.creatorId = creatorId
            self.id = id
            self.ides = ides
            self.inactivityTimeoutMinutes = inactivityTimeoutMinutes
            self.instanceType = instanceType
            self.lastUpdatedTime = lastUpdatedTime
            self.persistentStorage = persistentStorage
            self.projectName = projectName
            self.repositories = repositories
            self.spaceName = spaceName
            self.status = status
            self.statusReason = statusReason
        }

        private enum CodingKeys: String, CodingKey {
            case alias
            case creatorId
            case id
            case ides
            case inactivityTimeoutMinutes
            case instanceType
            case lastUpdatedTime
            case persistentStorage
            case projectName
            case repositories
            case spaceName
            case status
            case statusReason
        }
    }

    public struct GetProjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "name", location: .uri("name")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The name of the project in the space.
        public let name: String
        /// The name of the space.
        public let spaceName: String

        public init(name: String, spaceName: String) {
            self.name = name
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 63)
            try self.validate(self.name, name: "name", parent: name, min: 3)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetProjectResponse: AWSDecodableShape {
        /// The description of the project.
        public let description: String?
        /// The friendly name of the project displayed to users in Amazon CodeCatalyst.
        public let displayName: String?
        /// The name of the project in the space.
        public let name: String
        /// The name of the space.
        public let spaceName: String?

        public init(description: String? = nil, displayName: String? = nil, name: String, spaceName: String? = nil) {
            self.description = description
            self.displayName = displayName
            self.name = name
            self.spaceName = spaceName
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case displayName
            case name
            case spaceName
        }
    }

    public struct GetSourceRepositoryCloneUrlsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "sourceRepositoryName", location: .uri("sourceRepositoryName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The name of the project in the space.
        public let projectName: String
        /// The name of the source repository.
        public let sourceRepositoryName: String
        /// The name of the space.
        public let spaceName: String

        public init(projectName: String, sourceRepositoryName: String, spaceName: String) {
            self.projectName = projectName
            self.sourceRepositoryName = sourceRepositoryName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.sourceRepositoryName, name: "sourceRepositoryName", parent: name, max: 100)
            try self.validate(self.sourceRepositoryName, name: "sourceRepositoryName", parent: name, min: 1)
            try self.validate(self.sourceRepositoryName, name: "sourceRepositoryName", parent: name, pattern: "^(?!.*[.]git$)[\\w\\-.]*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSourceRepositoryCloneUrlsResponse: AWSDecodableShape {
        /// The HTTPS URL to use when cloning the source repository.
        public let https: String

        public init(https: String) {
            self.https = https
        }

        private enum CodingKeys: String, CodingKey {
            case https
        }
    }

    public struct GetSpaceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "name", location: .uri("name"))
        ]

        /// The name of the space.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 63)
            try self.validate(self.name, name: "name", parent: name, min: 3)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSpaceResponse: AWSDecodableShape {
        /// The description of the space.
        public let description: String?
        /// The friendly name of the space displayed to users.
        public let displayName: String?
        /// The name of the space.
        public let name: String
        /// The Amazon Web Services Region where the space exists.
        public let regionName: String

        public init(description: String? = nil, displayName: String? = nil, name: String, regionName: String) {
            self.description = description
            self.displayName = displayName
            self.name = name
            self.regionName = regionName
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case displayName
            case name
            case regionName
        }
    }

    public struct GetSubscriptionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The name of the space.
        public let spaceName: String

        public init(spaceName: String) {
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSubscriptionResponse: AWSDecodableShape {
        /// The display name of the Amazon Web Services account used for billing for the space.
        public let awsAccountName: String?
        /// The type of the billing plan for the space.
        public let subscriptionType: String?

        public init(awsAccountName: String? = nil, subscriptionType: String? = nil) {
            self.awsAccountName = awsAccountName
            self.subscriptionType = subscriptionType
        }

        private enum CodingKeys: String, CodingKey {
            case awsAccountName
            case subscriptionType
        }
    }

    public struct GetUserDetailsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .querystring("id")),
            AWSMemberEncoding(label: "userName", location: .querystring("userName"))
        ]

        /// The system-generated unique ID of the user.
        public let id: String?
        /// The name of the user as displayed in Amazon CodeCatalyst.
        public let userName: String?

        public init(id: String? = nil, userName: String? = nil) {
            self.id = id
            self.userName = userName
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetUserDetailsResponse: AWSDecodableShape {
        /// The friendly name displayed for the user in Amazon CodeCatalyst.
        public let displayName: String?
        /// The email address provided by the user when they signed up.
        public let primaryEmail: EmailAddress?
        /// The system-generated unique ID of the user.
        public let userId: String?
        /// The name of the user as displayed in Amazon CodeCatalyst.
        public let userName: String?
        public let version: String?

        public init(displayName: String? = nil, primaryEmail: EmailAddress? = nil, userId: String? = nil, userName: String? = nil, version: String? = nil) {
            self.displayName = displayName
            self.primaryEmail = primaryEmail
            self.userId = userId
            self.userName = userName
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case displayName
            case primaryEmail
            case userId
            case userName
            case version
        }
    }

    public struct Ide: AWSDecodableShape {
        /// The name of the IDE.
        public let name: String?
        /// A link to the IDE runtime image.
        public let runtime: String?

        public init(name: String? = nil, runtime: String? = nil) {
            self.name = name
            self.runtime = runtime
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case runtime
        }
    }

    public struct IdeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the IDE.
        public let name: String?
        /// A link to the IDE runtime image.
        public let runtime: String?

        public init(name: String? = nil, runtime: String? = nil) {
            self.name = name
            self.runtime = runtime
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case runtime
        }
    }

    public struct ListAccessTokensRequest: AWSEncodableShape {
        /// The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.
        public let maxResults: Int?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListAccessTokensResponse: AWSDecodableShape {
        /// A list of personal access tokens (PATs) associated with the calling user.
        public let items: [AccessTokenSummary]
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?

        public init(items: [AccessTokenSummary], nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items
            case nextToken
        }
    }

    public struct ListDevEnvironmentsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// Information about filters to apply to narrow the results returned in the list.
        public let filters: [Filter]?
        /// The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.
        public let maxResults: Int?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil, projectName: String, spaceName: String) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.projectName = projectName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters
            case maxResults
            case nextToken
        }
    }

    public struct ListDevEnvironmentsResponse: AWSDecodableShape {
        /// Information about the Dev Environments in a project.
        public let items: [DevEnvironmentSummary]
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?

        public init(items: [DevEnvironmentSummary], nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items
            case nextToken
        }
    }

    public struct ListEventLogsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The time after which you do not want any events retrieved, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @CustomCoding<ISO8601DateCoder>
        public var endTime: Date
        /// The name of the event.
        public let eventName: String?
        /// The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.
        public let maxResults: Int?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?
        /// The name of the space.
        public let spaceName: String
        /// The date and time when you want to start retrieving events, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @CustomCoding<ISO8601DateCoder>
        public var startTime: Date

        public init(endTime: Date, eventName: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, spaceName: String, startTime: Date) {
            self.endTime = endTime
            self.eventName = eventName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.spaceName = spaceName
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case endTime
            case eventName
            case maxResults
            case nextToken
            case startTime
        }
    }

    public struct ListEventLogsResponse: AWSDecodableShape {
        /// Information about each event retrieved in the list.
        public let items: [EventLogEntry]
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?

        public init(items: [EventLogEntry], nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items
            case nextToken
        }
    }

    public struct ListProjectsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// Information about filters to apply to narrow the results returned in the list.
        public let filters: [ProjectListFilter]?
        /// The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.
        public let maxResults: Int?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?
        /// The name of the space.
        public let spaceName: String

        public init(filters: [ProjectListFilter]? = nil, maxResults: Int? = nil, nextToken: String? = nil, spaceName: String) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters
            case maxResults
            case nextToken
        }
    }

    public struct ListProjectsResponse: AWSDecodableShape {
        /// Information about the projects.
        public let items: [ProjectSummary]?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?

        public init(items: [ProjectSummary]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items
            case nextToken
        }
    }

    public struct ListSourceRepositoriesItem: AWSDecodableShape {
        /// The time the source repository was created, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @CustomCoding<ISO8601DateCoder>
        public var createdTime: Date
        /// The description of the repository, if any.
        public let description: String?
        /// The system-generated unique ID of the source repository.
        public let id: String
        /// The time the source repository was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @CustomCoding<ISO8601DateCoder>
        public var lastUpdatedTime: Date
        /// The name of the source repository.
        public let name: String

        public init(createdTime: Date, description: String? = nil, id: String, lastUpdatedTime: Date, name: String) {
            self.createdTime = createdTime
            self.description = description
            self.id = id
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case createdTime
            case description
            case id
            case lastUpdatedTime
            case name
        }
    }

    public struct ListSourceRepositoriesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.
        public let maxResults: Int?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, projectName: String, spaceName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.projectName = projectName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListSourceRepositoriesResponse: AWSDecodableShape {
        /// Information about the source repositories.
        public let items: [ListSourceRepositoriesItem]?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?

        public init(items: [ListSourceRepositoriesItem]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items
            case nextToken
        }
    }

    public struct ListSourceRepositoryBranchesItem: AWSDecodableShape {
        /// The commit ID of the tip of the branch at the time of the request, also known as the head commit.
        public let headCommitId: String?
        /// The time the branch was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdatedTime: Date?
        /// The name of the branch.
        public let name: String?
        /// The Git reference name of the branch.
        public let ref: String?

        public init(headCommitId: String? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, ref: String? = nil) {
            self.headCommitId = headCommitId
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.ref = ref
        }

        private enum CodingKeys: String, CodingKey {
            case headCommitId
            case lastUpdatedTime
            case name
            case ref
        }
    }

    public struct ListSourceRepositoryBranchesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "sourceRepositoryName", location: .uri("sourceRepositoryName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.
        public let maxResults: Int?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the source repository.
        public let sourceRepositoryName: String
        /// The name of the space.
        public let spaceName: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, projectName: String, sourceRepositoryName: String, spaceName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.projectName = projectName
            self.sourceRepositoryName = sourceRepositoryName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.sourceRepositoryName, name: "sourceRepositoryName", parent: name, max: 100)
            try self.validate(self.sourceRepositoryName, name: "sourceRepositoryName", parent: name, min: 1)
            try self.validate(self.sourceRepositoryName, name: "sourceRepositoryName", parent: name, pattern: "^(?!.*[.]git$)[\\w\\-.]*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListSourceRepositoryBranchesResponse: AWSDecodableShape {
        /// Information about the source branches.
        public let items: [ListSourceRepositoryBranchesItem]?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?

        public init(items: [ListSourceRepositoryBranchesItem]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items
            case nextToken
        }
    }

    public struct ListSpacesRequest: AWSEncodableShape {
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?

        public init(nextToken: String? = nil) {
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
        }
    }

    public struct ListSpacesResponse: AWSDecodableShape {
        /// Information about the space.
        public let items: [SpaceSummary]?
        /// A token returned from a call to this API to indicate the next batch of results to return, if any.
        public let nextToken: String?

        public init(items: [SpaceSummary]? = nil, nextToken: String? = nil) {
            self.items = items
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case items
            case nextToken
        }
    }

    public struct PersistentStorage: AWSDecodableShape {
        /// The size of the persistent storage in gigabytes (specifically GiB).  Valid values for storage are based on memory sizes in 16GB increments. Valid values are 16, 32, and 64.
        public let sizeInGiB: Int

        public init(sizeInGiB: Int) {
            self.sizeInGiB = sizeInGiB
        }

        private enum CodingKeys: String, CodingKey {
            case sizeInGiB
        }
    }

    public struct PersistentStorageConfiguration: AWSEncodableShape {
        /// The size of the persistent storage in gigabytes (specifically GiB).  Valid values for storage are based on memory sizes in 16GB increments. Valid values are 16, 32, and 64.
        public let sizeInGiB: Int

        public init(sizeInGiB: Int) {
            self.sizeInGiB = sizeInGiB
        }

        private enum CodingKeys: String, CodingKey {
            case sizeInGiB
        }
    }

    public struct ProjectInformation: AWSDecodableShape {
        /// The name of the project in the space.
        public let name: String?
        /// The system-generated unique ID of the project.
        public let projectId: String?

        public init(name: String? = nil, projectId: String? = nil) {
            self.name = name
            self.projectId = projectId
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case projectId
        }
    }

    public struct ProjectListFilter: AWSEncodableShape {
        /// The operator used to compare the fields.
        public let comparisonOperator: ComparisonOperator?
        /// A key that can be used to sort results.
        public let key: FilterKey
        /// The value of the key.
        public let values: [String]

        public init(comparisonOperator: ComparisonOperator? = nil, key: FilterKey, values: [String]) {
            self.comparisonOperator = comparisonOperator
            self.key = key
            self.values = values
        }

        private enum CodingKeys: String, CodingKey {
            case comparisonOperator
            case key
            case values
        }
    }

    public struct ProjectSummary: AWSDecodableShape {
        /// The description of the project.
        public let description: String?
        /// The friendly name displayed to users of the project in Amazon CodeCatalyst.
        public let displayName: String?
        /// The name of the project in the space.
        public let name: String

        public init(description: String? = nil, displayName: String? = nil, name: String) {
            self.description = description
            self.displayName = displayName
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case displayName
            case name
        }
    }

    public struct RepositoryInput: AWSEncodableShape {
        /// The name of the branch in a source repository.
        public let branchName: String?
        /// The name of the source repository.
        public let repositoryName: String

        public init(branchName: String? = nil, repositoryName: String) {
            self.branchName = branchName
            self.repositoryName = repositoryName
        }

        public func validate(name: String) throws {
            try self.validate(self.branchName, name: "branchName", parent: name, max: 100)
            try self.validate(self.branchName, name: "branchName", parent: name, min: 1)
            try self.validate(self.repositoryName, name: "repositoryName", parent: name, max: 100)
            try self.validate(self.repositoryName, name: "repositoryName", parent: name, min: 1)
            try self.validate(self.repositoryName, name: "repositoryName", parent: name, pattern: "^(?!.*[.]git$)[\\w\\-.]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case branchName
            case repositoryName
        }
    }

    public struct SpaceSummary: AWSDecodableShape {
        /// The description of the space.
        public let description: String?
        /// The friendly name of the space displayed to users.
        public let displayName: String?
        ///  We need to know what this is and the basic usage information so that third-party developers know how to use this data type.
        public let name: String
        /// The Amazon Web Services Region where the space exists.
        public let regionName: String

        public init(description: String? = nil, displayName: String? = nil, name: String, regionName: String) {
            self.description = description
            self.displayName = displayName
            self.name = name
            self.regionName = regionName
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case displayName
            case name
            case regionName
        }
    }

    public struct StartDevEnvironmentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// Information about the integrated development environment (IDE) configured for a Dev Environment.
        public let ides: [IdeConfiguration]?
        /// The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Only whole integers are allowed. Dev Environments consume compute minutes when running.
        public let inactivityTimeoutMinutes: Int?
        /// The Amazon EC2 instace type to use for the Dev Environment.
        public let instanceType: InstanceType?
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(id: String, ides: [IdeConfiguration]? = nil, inactivityTimeoutMinutes: Int? = nil, instanceType: InstanceType? = nil, projectName: String, spaceName: String) {
            self.id = id
            self.ides = ides
            self.inactivityTimeoutMinutes = inactivityTimeoutMinutes
            self.instanceType = instanceType
            self.projectName = projectName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
            try self.validate(self.ides, name: "ides", parent: name, max: 1)
            try self.validate(self.inactivityTimeoutMinutes, name: "inactivityTimeoutMinutes", parent: name, max: 1200)
            try self.validate(self.inactivityTimeoutMinutes, name: "inactivityTimeoutMinutes", parent: name, min: 0)
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case ides
            case inactivityTimeoutMinutes
            case instanceType
        }
    }

    public struct StartDevEnvironmentResponse: AWSDecodableShape {
        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String
        /// The status of the Dev Environment.
        public let status: DevEnvironmentStatus

        public init(id: String, projectName: String, spaceName: String, status: DevEnvironmentStatus) {
            self.id = id
            self.projectName = projectName
            self.spaceName = spaceName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case projectName
            case spaceName
            case status
        }
    }

    public struct StartDevEnvironmentSessionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// The name of the project in the space.
        public let projectName: String
        public let sessionConfiguration: DevEnvironmentSessionConfiguration
        /// The name of the space.
        public let spaceName: String

        public init(id: String, projectName: String, sessionConfiguration: DevEnvironmentSessionConfiguration, spaceName: String) {
            self.id = id
            self.projectName = projectName
            self.sessionConfiguration = sessionConfiguration
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case sessionConfiguration
        }
    }

    public struct StartDevEnvironmentSessionResponse: AWSDecodableShape {
        public let accessDetails: DevEnvironmentAccessDetails
        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// The name of the project in the space.
        public let projectName: String
        /// The system-generated unique ID of the Dev Environment session.
        public let sessionId: String?
        /// The name of the space.
        public let spaceName: String

        public init(accessDetails: DevEnvironmentAccessDetails, id: String, projectName: String, sessionId: String? = nil, spaceName: String) {
            self.accessDetails = accessDetails
            self.id = id
            self.projectName = projectName
            self.sessionId = sessionId
            self.spaceName = spaceName
        }

        private enum CodingKeys: String, CodingKey {
            case accessDetails
            case id
            case projectName
            case sessionId
            case spaceName
        }
    }

    public struct StopDevEnvironmentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(id: String, projectName: String, spaceName: String) {
            self.id = id
            self.projectName = projectName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopDevEnvironmentResponse: AWSDecodableShape {
        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String
        /// The status of the Dev Environment.
        public let status: DevEnvironmentStatus

        public init(id: String, projectName: String, spaceName: String, status: DevEnvironmentStatus) {
            self.id = id
            self.projectName = projectName
            self.spaceName = spaceName
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case projectName
            case spaceName
            case status
        }
    }

    public struct UpdateDevEnvironmentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "projectName", location: .uri("projectName")),
            AWSMemberEncoding(label: "spaceName", location: .uri("spaceName"))
        ]

        /// The user-specified alias for the Dev Environment. Changing this value will not cause a restart.
        public let alias: String?
        /// A user-specified idempotency token.  Idempotency ensures that an API request completes only once.  With an idempotent request, if the original request completes successfully, the subsequent retries return the result from the original successful request and have no additional effect.
        public let clientToken: String?
        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// Information about the integrated development environment (IDE) configured for a Dev Environment.
        public let ides: [IdeConfiguration]?
        /// The amount of time the Dev Environment will run without any activity detected before stopping, in minutes.  Only whole integers are allowed. Dev Environments consume compute minutes when running.  Changing this value will cause a restart of the Dev Environment if it is running.
        public let inactivityTimeoutMinutes: Int?
        /// The Amazon EC2 instace type to use for the Dev Environment.   Changing this value will cause a restart of the Dev Environment if it is running.
        public let instanceType: InstanceType?
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(alias: String? = nil, clientToken: String? = nil, id: String, ides: [IdeConfiguration]? = nil, inactivityTimeoutMinutes: Int? = nil, instanceType: InstanceType? = nil, projectName: String, spaceName: String) {
            self.alias = alias
            self.clientToken = clientToken
            self.id = id
            self.ides = ides
            self.inactivityTimeoutMinutes = inactivityTimeoutMinutes
            self.instanceType = instanceType
            self.projectName = projectName
            self.spaceName = spaceName
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 1024)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
            try self.validate(self.ides, name: "ides", parent: name, max: 1)
            try self.validate(self.inactivityTimeoutMinutes, name: "inactivityTimeoutMinutes", parent: name, max: 1200)
            try self.validate(self.inactivityTimeoutMinutes, name: "inactivityTimeoutMinutes", parent: name, min: 0)
            try self.validate(self.projectName, name: "projectName", parent: name, max: 63)
            try self.validate(self.projectName, name: "projectName", parent: name, min: 3)
            try self.validate(self.projectName, name: "projectName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
            try self.validate(self.spaceName, name: "spaceName", parent: name, max: 63)
            try self.validate(self.spaceName, name: "spaceName", parent: name, min: 3)
            try self.validate(self.spaceName, name: "spaceName", parent: name, pattern: "^[a-zA-Z0-9]+(?:[-_\\.][a-zA-Z0-9]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case alias
            case clientToken
            case ides
            case inactivityTimeoutMinutes
            case instanceType
        }
    }

    public struct UpdateDevEnvironmentResponse: AWSDecodableShape {
        /// The user-specified alias for the Dev Environment.
        public let alias: String?
        /// A user-specified idempotency token.  Idempotency ensures that an API request completes only once.  With an idempotent request, if the original request completes successfully, the subsequent retries return the result from the original successful request and have no additional effect.
        public let clientToken: String?
        /// The system-generated unique ID of the Dev Environment.
        public let id: String
        /// Information about the integrated development environment (IDE) configured for the Dev Environment.
        public let ides: [IdeConfiguration]?
        /// The amount of time the Dev Environment will run without any activity detected before stopping, in minutes.
        public let inactivityTimeoutMinutes: Int?
        /// The Amazon EC2 instace type to use for the Dev Environment.
        public let instanceType: InstanceType?
        /// The name of the project in the space.
        public let projectName: String
        /// The name of the space.
        public let spaceName: String

        public init(alias: String? = nil, clientToken: String? = nil, id: String, ides: [IdeConfiguration]? = nil, inactivityTimeoutMinutes: Int? = nil, instanceType: InstanceType? = nil, projectName: String, spaceName: String) {
            self.alias = alias
            self.clientToken = clientToken
            self.id = id
            self.ides = ides
            self.inactivityTimeoutMinutes = inactivityTimeoutMinutes
            self.instanceType = instanceType
            self.projectName = projectName
            self.spaceName = spaceName
        }

        private enum CodingKeys: String, CodingKey {
            case alias
            case clientToken
            case id
            case ides
            case inactivityTimeoutMinutes
            case instanceType
            case projectName
            case spaceName
        }
    }

    public struct UserIdentity: AWSDecodableShape {
        /// The Amazon Web Services account number of the user in Amazon Web Services, if any.
        public let awsAccountId: String?
        public let principalId: String
        /// The display name of the user in Amazon CodeCatalyst.
        public let userName: String?
        /// The role assigned to the user in a Amazon CodeCatalyst space or project when the event occurred.
        public let userType: UserType

        public init(awsAccountId: String? = nil, principalId: String, userName: String? = nil, userType: UserType) {
            self.awsAccountId = awsAccountId
            self.principalId = principalId
            self.userName = userName
            self.userType = userType
        }

        private enum CodingKeys: String, CodingKey {
            case awsAccountId
            case principalId
            case userName
            case userType
        }
    }

    public struct VerifySessionResponse: AWSDecodableShape {
        /// The system-generated unique ID of the user in Amazon CodeCatalyst.
        public let identity: String?

        public init(identity: String? = nil) {
            self.identity = identity
        }

        private enum CodingKeys: String, CodingKey {
            case identity
        }
    }
}

// MARK: - Errors

/// Error enum for CodeCatalyst
public struct CodeCatalystErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case conflictException = "ConflictException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize CodeCatalyst
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The request was denied because you don&#39;t have sufficient access to perform this action. Verify that you are a member of a role that allows this action.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// The request was denied because the requested operation would cause a conflict with the current state of a service resource associated with the request.  Another user might have updated the resource. Reload, make sure you have the latest data, and then try again.
    public static var conflictException: Self { .init(.conflictException) }
    /// The request was denied because the specified resource was not found. Verify that the spelling is correct and that you have access to the resource.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The request was denied because one or more resources has reached its limits for the tier the space belongs to. Either reduce the number of resources, or change the tier if applicable.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// The request was denied due to request throttling.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// The request was denied because an input failed to satisfy the constraints specified by the service. Check the spelling and input requirements, and then try again.
    public static var validationException: Self { .init(.validationException) }
}

extension CodeCatalystErrorType: Equatable {
    public static func == (lhs: CodeCatalystErrorType, rhs: CodeCatalystErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension CodeCatalystErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
